package cn.springcloud.fix.saas.controller;

import io.swagger.annotations.Api;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户表 前端控制器
 *
 * @author yang jun
 * @since 2023-10-27
 */
@Slf4j
@RestController
@AllArgsConstructor
@RequestMapping(value = "/user")
@Api(value = "/user", tags = {"用户表接口"})
public class UserController {

    @GetMapping(value = "")
    public Object getByUsername() {
        return "ok";
    }

    @GetMapping("/user")
    public Authentication user(Authentication user) {
        return user;
    }
}